<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'option explicit
Response.Expires=0 
Response.Buffer=TRUE
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>

<%
connect = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=Test;Password=Test;Initial Catalog=meps;Data Source=192.168.11.4"
'connect = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=sa;Data Source=(local);Initial Catalog=meps"

'??????? ?????? Connection
Set objConnection=Server.CreateObject("ADODB.Connection")
'??????? ?????? Recordset
Set objRecordset=Server.CreateObject("ADODB.Recordset")

objRecordset.PageSize = 50

strselect="al.id as alid , regN, Operation, [datetime]"

strSQL="SELECT "&strselect&" FROM Automatlog AL LEFT JOIN Automats A on AL.Automat = A.AutomatNumber WHERE Operation like 'JKX%' ORDER BY [DateTime]"

sSQL=strSQL
'?????????? ? ??
objConnection.open connect

'????????? ?????? SQL 
objRecordset.open sSQL,objConnection ,adOpenKeyset
response.write "<b>"&sSQL&"</b>"
%>

<%
if not objRecordset.eof then
%>

<table border=0 width="100%" height=7%>
<tr>
<td width="53%">
<!--include file="inc/StringPage.asp"--> 
<%'response.write StringPage(objRecordset,50,nom,"nom","ProverAutomatLog.asp?","","","...","...") %>
</td>


<table class="FontTable" cellspacing="0"  border="1" width="100%"  align="center" bgcolor="#FFFFCC">
<!--
<tr bgcolor="#CCCCFF">
<%'for i=0 to rs.fields.count-1 %>
	<th><%'	response.write rs(i)%></th>
<% 'next %>
</tr>
-->

                              <%
							 
							i=1
Do while (Not objRecordset.eof) AND i <= objRecordset.Pagesize
							 
							  %>
							  
							  
<tr>

<%for i=0 to objRecordset.fields.count-1 %>
	<td><%	response.write objRecordset(i)&"&nbsp;"%></td>
<% next %>

</tr>



                           <% 
							 
				objRecordset.MoveNext
                         i=i+1
                          Loop
							 
							 %>							  


</table>


<%
end if
objRecordset.Close
objConnection.Close
Set objRecordset = Nothing
Set objConnection = Nothing
%>
</body>
</html>
